// HerosServiceImpl.java
package com.geek.hero.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.geek.hero.entity.Heros;
import com.geek.hero.mapper.HerosMapper;
import com.geek.hero.service.IHerosService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 英雄服务实现类
 * </p>
 *
 * @author author
 * @since 2025-09-14
 */
@Service
public class HerosServiceImpl extends ServiceImpl<HerosMapper, Heros> implements IHerosService {

    @Override
    public List<Heros> searchByName(String keyword) {
        QueryWrapper<Heros> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("name", keyword);
        return this.list(queryWrapper);
    }
}
